/*
	Name: 
	Copyright: 
	Author: 
	Date: 09/03/14 22:34
	Description: Tham chieu - Tham tri
*/
#include <conio.h>
#include <stdio.h>
#include <alloc.h>
// ham tham tri la doi so ko phai la con tro
// nguoc laij

void hoanVi(int a, int b){
	int tmp = a;
	a = b;
	b = tmp;
}
void hoanViTC(int &a, int &b){
	int tmp = a;
	a = b;
	b = tmp;
}


void hoanViP(int *a, int *b){
	int tmp = *a;
	*a = *b;
	*b = tmp;
}
int main(){
	int x = 10;
	int y = 12;
	printf("\n Truoc khi hoan vi:\n ");
	printf("x = %d |  y = %d  \n",x,y);
	printf("\n Sau khi hoan vi: ");
	hoanViP(&x,&y);
	printf("\nx = %d |  y = %d",x,y);
	getch();
}
